<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddVehicleTypeToUsers extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('users', function (Blueprint $table) {
            $table->string('vehicle_type')->default('')->comment('首租车型');
            $table->integer('lease_days')->default(0)->comment('首租天数');
            $table->tinyInteger('is_deposit_free')->default(1)->comment('是否免押金1不免押2免押');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('users', function (Blueprint $table) {
            $table->string('vehicle_type')->default('')->comment('首租车型');
            $table->integer('lease_days')->default(0)->comment('首租天数');
            $table->tinyInteger('is_deposit')->default(0)->comment('是否免押金');
        });
    }
}
